package cn.blunce.base;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import cn.blunce.model.Person;
import cn.blunce.mylib.R;

public class DBTest extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dbtest);

        AppDB.getInstance(DBTest.this);

        Person person = new Person();
        person.setId(System.currentTimeMillis());
        person.setName("blunce");
        person.setAge("24");

        AppDB.add(person);
        Log.i("DBTest", AppDB.getsPersonDao().loadAll().get(0).toString());
    }
}

